package com.example.login.entity;

import com.example.login.R;

import java.util.ArrayList;
import java.util.List;

public class DataService {

    /**
     * 模拟提供页面数据
     * @param position
     * @return
     */
    public static List<ProductInfo> getListData(int position) {

        List<ProductInfo> list = new ArrayList<>();
        if (position == 0) {
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"00product_title", "详情详情详情详情", 38));
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"000product_title", "详情详情详情详情", 38));
        } else if(position == 1) {
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"11product_title", "详情详情详情详情", 38));
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"111product_title", "详情详情详情详情", 38));
        } else if(position == 2) {
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"22product_title", "详情详情详情详情", 38));
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"222product_title", "详情详情详情详情", 38));
        } else if(position == 3) {
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"33product_title", "详情详情详情详情", 38));
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"333product_title", "详情详情详情详情", 38));
        } else if(position == 4) {
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"44product_title", "详情详情详情详情", 38));
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"444product_title", "详情详情详情详情", 38));
        } else { // 5
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"55product_title", "详情详情详情详情", 38));
            list.add(new ProductInfo(0, R.mipmap.ic_launcher,"555product_title", "详情详情详情详情", 38));
        }
        return list;
    }
}
